/*
 * main.cpp
 * example file for Scanner++
 */

#include<iostream>

//#include "printable.h"
#include "Scanner.h"

using namespace std;

int main()
{
	Scanner scannerFile(new File("LICENSE"));
	while (scannerFile.hasNext())
		cout << scannerFile.next() << " ";

	Scanner scannerStr("Welcome!");
	while (scannerStr.hasNext())
		cout << endl << scannerStr.next() << endl;

	/*
	Scanner scannerXML(new File("exemplo.xml"));
	while (scannerXML.hasNext())
	{
		pair<string, map<string, string> > p = scannerXML.nextXMLTag();
		cout << "name=" << p.first << " size=" << p.second.size() << " attr=" << p.second << endl;
	}
	*/

	Scanner scannerCin(&cin);
	cout << scannerCin.next() << endl;

	cout << "Program ended" << endl;
	return 0;
}
